package com.yingdong.db;

import com.yingdong.annotation.PrimeKey;
import com.yingdong.annotation.AutoIncrease;
import java.util.ArrayList;
import java.util.List;

public class Userpet extends DBObject{
    
    private static List<Userpet> delList=new ArrayList<>();
   
	private static Userpet instance;

    /**
	 * 
	 */
	@PrimeKey
	@AutoIncrease
    private Integer id;
    
    /**
	 * 角色id
	 */
	
	
    private Integer userId;
    
    /**
	 * 宠物模版id
	 */
	
	
    private Integer entId;
    
    /**
	 * 位置索引
	 */
	
	
    private Integer pos;
    
    /**
	 * 名字
	 */
	
	
    private String name;
    
    /**
	 * 宠物等级
	 */
	
	
    private Integer level;
    
    /**
	 * 阶段
	 */
	
	
    private Integer stage;
    
    /**
	 * 健康
	 */
	
	
    private Integer health;
    
    /**
	 * 心情
	 */
	
	
    private Integer mood;
    
    /**
	 * 饥饿度
	 */
	
	
    private Integer hunger;
    
    /**
	 * 口渴度
	 */
	
	
    private Integer thirsty;
    
    /**
	 * 清洁度
	 */
	
	
    private Integer clean;
    
    /**
	 * 疲劳度
	 */
	
	
    private Integer tired;
    
    /**
	 * 亲密度
	 */
	
	
    private Integer close;
    
    /**
	 * 体力
	 */
	
	
    private Integer strength;
    
    /**
	 * 活力
	 */
	
	
    private Integer vitality;
    
    /**
	 * 耐力
	 */
	
	
    private Integer endurance;
    
    /**
	 * 智力
	 */
	
	
    private Integer intelligence;
    
    /**
	 * 魅力
	 */
	
	
    private Integer charm;
    
    /**
	 * 亲和力
	 */
	
	
    private Integer affinity;
    
 

    public Integer getId() {
	    return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
		changeDBStatus();
	}

    public Integer getUserId() {
	    return userId;
	}
	
	public void setUserId(Integer userId) {
		this.userId = userId;
		changeDBStatus();
	}

    public Integer getEntId() {
	    return entId;
	}
	
	public void setEntId(Integer entId) {
		this.entId = entId;
		changeDBStatus();
	}

    public Integer getPos() {
	    return pos;
	}
	
	public void setPos(Integer pos) {
		this.pos = pos;
		changeDBStatus();
	}

    public String getName() {
	    return name;
	}
	
	public void setName(String name) {
		this.name = name;
		changeDBStatus();
	}

    public Integer getLevel() {
	    return level;
	}
	
	public void setLevel(Integer level) {
		this.level = level;
		changeDBStatus();
	}

    public Integer getStage() {
	    return stage;
	}
	
	public void setStage(Integer stage) {
		this.stage = stage;
		changeDBStatus();
	}

    public Integer getHealth() {
	    return health;
	}
	
	public void setHealth(Integer health) {
		this.health = health;
		changeDBStatus();
	}

    public Integer getMood() {
	    return mood;
	}
	
	public void setMood(Integer mood) {
		this.mood = mood;
		changeDBStatus();
	}

    public Integer getHunger() {
	    return hunger;
	}
	
	public void setHunger(Integer hunger) {
		this.hunger = hunger;
		changeDBStatus();
	}

    public Integer getThirsty() {
	    return thirsty;
	}
	
	public void setThirsty(Integer thirsty) {
		this.thirsty = thirsty;
		changeDBStatus();
	}

    public Integer getClean() {
	    return clean;
	}
	
	public void setClean(Integer clean) {
		this.clean = clean;
		changeDBStatus();
	}

    public Integer getTired() {
	    return tired;
	}
	
	public void setTired(Integer tired) {
		this.tired = tired;
		changeDBStatus();
	}

    public Integer getClose() {
	    return close;
	}
	
	public void setClose(Integer close) {
		this.close = close;
		changeDBStatus();
	}

    public Integer getStrength() {
	    return strength;
	}
	
	public void setStrength(Integer strength) {
		this.strength = strength;
		changeDBStatus();
	}

    public Integer getVitality() {
	    return vitality;
	}
	
	public void setVitality(Integer vitality) {
		this.vitality = vitality;
		changeDBStatus();
	}

    public Integer getEndurance() {
	    return endurance;
	}
	
	public void setEndurance(Integer endurance) {
		this.endurance = endurance;
		changeDBStatus();
	}

    public Integer getIntelligence() {
	    return intelligence;
	}
	
	public void setIntelligence(Integer intelligence) {
		this.intelligence = intelligence;
		changeDBStatus();
	}

    public Integer getCharm() {
	    return charm;
	}
	
	public void setCharm(Integer charm) {
		this.charm = charm;
		changeDBStatus();
	}

    public Integer getAffinity() {
	    return affinity;
	}
	
	public void setAffinity(Integer affinity) {
		this.affinity = affinity;
		changeDBStatus();
	}
 
 	public static Userpet getInstance() {
		if (instance == null)
			instance = new Userpet();
		return instance;
	}
 
    @Override
    public String getSelectByKeyString(){
    	String sql="SELECT * FROM Userpet WHERE 1=1  AND id=? ";
        return sql;
    }
    
    @Override
    public String getUpdateByKeyString(){
    	String sql="UPDATE  Userpet SET    userId=?,  entId=?,  pos=?,  name=?,  level=?,  stage=?,  health=?,  mood=?,  hunger=?,  thirsty=?,  clean=?,  tired=?,  close=?,  strength=?,  vitality=?,  endurance=?,  intelligence=?,  charm=?,  affinity=?    WHERE 1=1   AND id=?";
        return sql;
    }
    
    @Override
    public String getSelectAllObjectsString(){
    	String sql="SELECT * FROM Userpet ";
        return sql;
    }
    
    @Override
    public String getDelObjectKeyString(){
    	String sql="DELETE  FROM Userpet WHERE 1=1   AND id=?";
        return sql;
    }
    
    @Override
    public String getSelectAllObjectsKeyString(){
    	String sql="SELECT * FROM Userpet WHERE 1=1   AND id=?";
        return sql;
    }
    
    
    @Override
	public String getTableName(){
	   return "Userpet";
	}

}